package com.xuecheng.content.controller;

import com.xuecheng.api.content.TeachplanMediaControllerApi;
import com.xuecheng.api.content.model.dto.TeachplanMediaDTO;
import com.xuecheng.common.domain.response.RestResponse;
import com.xuecheng.content.service.TeachplanMediaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 黄子弟
 */
@Slf4j
@RestController
public class TeachplanMediaController implements TeachplanMediaControllerApi {

    @Autowired
    private TeachplanMediaService  teachplanMediaService;


    @GetMapping("/l/content/{mediaId}")
    public RestResponse<TeachplanMediaDTO> getById(@PathVariable Long mediaId){
        RestResponse<TeachplanMediaDTO> restResponse = teachplanMediaService.getById(mediaId);
        return  restResponse;
    }
}
